<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Schools Management System</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../style.css" media="screen" />

</head>
<body>

<?php

include_once '../Login/databaseconnection.php';

if(!loggedin())
{
	require_once '../index.php';
}
else
{ if(isset($_POST['SaveChanges']))
   {
 
   require_once 'UPP.php';
   }
	$Census_Number="";
		if(isset($_POST['Edit_this']))
		{
$Census_Number=$_POST['Census_Number'];

	$_SESSION['Census_Number']=$Census_Number;
 if($Census_Number=="Select One")
	   {
	   
$_SESSION['errorin1']="Please select the census number!";
	   }
	   else
	   {
	    $result=mysql_query("SELECT * FROM school WHERE Census_Number='$Census_Number'");
	   if(mysql_num_rows($result)==0)
   {

	   $_SESSION['errornorow']="Very sorry there is no result,Please check your input and try again!";
   }
   }
	   }
	
?>
<div id="wrap">

<div id="header"><table width="1239" border="0">
  <tr>
    <td width="866" height="119" rowspan="2"><h1 class="heaaderte"><font color="#996699" style="text-shadow:#969" size="+6">Schools Management System</font></h1></td>
    <td width="110" height="88">&nbsp;</td>
    <td width="161">&nbsp;</td>
    <td width="84">&nbsp;</td>
  </tr>
  <tr>
    <td height="21">&nbsp;</td>
    <td>
	<?Php
	//$First_Name=$_SESSION['First_Name'];
    //$_SESSION['Last_Name']=$Last_Name;
	  if(isset($_SESSION['First_Name']))
	  
{
      echo "Hi,". $_SESSION['First_Name']." ".$_SESSION['Last_Name'];
}
?></td>
    <td><a href="../Logout.php" class="logout">Logout</a></td>
  </tr>
  </table>
</div>

<div id="menu1_bg">
		<div id="menu1">
			
	
	
			<ul>
				<li><a href="../index.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Home</font></a></li>
				<li><a href="Schools.php" class="active"><font color="#CCCC66" style="text-shadow:#969" size="+1">Schools</font></a></li>
				<li><a href="../Teachers/teachers.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Teachers</font></a></li>
				<li><a href="../Lab/Labs.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Labs</font></a></li>
				<li><a href="../Resources/Resources.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resources</font></a></li>
                <li><a href="#"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resource Team</font></a></li>
                         <li><a href="../Programmes/Programmes.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Programmes</font></a></li>
                                  <li><a href="../Competition/Competition.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Competitions</font></a></li>
                 <li></li>
			</ul>
	</div>
</div>
<div class="lefts">
  
<div class="articles">
<form action="#" method="POST"> <table width="1000" border="0">
  <tr>
    <th height="18" colspan="10" align="left" scope="row">
   <?php
    if(isset($_POST['Edit_this'])||isset($_POST['SaveChanges']))
{
	if(isset($_SESSION['errorin1']))
	{
		echo $_SESSION['errorin1'];
		unset($_SESSION['errorin1']);
	}
	if(isset($_SESSION['errornorow']))
	{
		echo $_SESSION['errornorow'];
		unset($_SESSION['errornorow']);
	}

	if(isset($_SESSION['errorin']))
	{
		echo $_SESSION['errorin'];
		unset($_SESSION['errorin']);
	}
	if(isset($_SESSION['error']))
	{
		echo $_SESSION['error'];
		unset($_SESSION['error']);
		
	}
	
}
?></th>
    <td colspan="4">&nbsp;</td>
  </tr>
  </table>
  <table width="458" border="0">
 
         
          <tr>
            <th height="22" align="left" scope="row">&nbsp;</th>
            <th align="left" scope="row" width="159">School Census
            <label>Number</label></th>
            <th align="left" scope="row">:-</th>
            <td colspan="2"> <select name="Census_Number" id="select">
			<?php
	  
	  if(isset($_POST['Edit_This']))
	  {
	 echo '<option value="'.$Census_Number.'">'.$Census_Number.'</option>';
	  }
	  else
	  {
	  echo '<option value="Select One">Select One</option>';
	  }
	  ?>
      <?php
	  $CEN=mysql_query("SELECT DISTINCT(Census_Number) FROM school");
	  
  while($row=mysql_fetch_array($CEN))
  {
	  $cen_no=$row['Census_Number'];
	  echo '<option value="'.$cen_no.'">'.$cen_no.'</option>';
  }
	  ?>
     
      </select></td>
          </tr>
          <tr>
            <th width="81" height="20" align="left" scope="row">&nbsp;</th>
            <th width="159" align="left" scope="row">&nbsp;</th>
            <th width="9" align="left" scope="row">&nbsp;</th>
            <td width="77">&nbsp;</td>
            <td width="110"><a href="UpdateSch.php">Reset</a>|
            <input name="Edit_this" dir="right" align="middle" type="submit" value="Edit this"/></td>
          </tr>
      
 
  </table>
</form>
<form action="#" method="POST">
<?php
if(isset($_POST['Edit_this']))
		{
if($Census_Number!="Select One")
	   {
	   
   $result=mysql_query("SELECT * FROM school WHERE Census_Number='$Census_Number'");

		echo '<table width="1000" height="400" border="0">';
 while($row=mysql_fetch_array($result))
  {
 
$School_Id=$row['School_Id'];
  $Zone=$row['Zone'];
  $Division=$row['Division'];
  $Province=$row['Province'];
  $District=$row['District'];
  $Census_Number=$row['Census_Number'];
  $Name=$row['Name'];
  $Status=$row['Status'];
  $Type=$row['Type'];
  $Grade_Range=$row['Grade_Range'];
  $Medium=$row['Medium'];
  $Female_Students=$row['Female_Students'];
  $Male_Students=$row['Male_Students'];
  $Tp_Number=$row['Tp_Number'];
  $Fax_Number=$row['Fax_Number'];
  $E_Mail=$row['E_Mail'];
  $Web_Address=$row['Web_Address'];
  $Special_Projects=$row['Special_Projects'];
$S_Pro="";
  for($i=0;$i<count($Special_Projects);$i++)
  {
	 $S_Pro+=$Special_Projects[$i];
  }
  $Address=$row['Address'];
  $Account_Number=$row['Account_Number'];
  
   ?>
		<?php
	
    echo '<tr>';
      echo '<th height="24" colspan="3" align="left" scope="row">';
	  echo "BASIC INFORMATION";
	  echo '</th>';
      echo '<th align="left" scope="row"height="09">';
	  echo '</th>';
      echo '<th align="left" scope="row"height="09">';
	  echo '</th>';
      echo '<td colspan="5">';
	
	  echo "CONTACT INFORMATION";
	  echo '</td>';
      echo '<td colspan="4">';

	  echo "BANK ACCOUNT DETAILS";
	  echo '</td>';
    echo '</tr>';
    echo '<tr>';
      echo '<th width="73" height="24" scope="row" align="left">';
echo "School ID";
      echo '</th>';
      echo '<th width="8" scope="row" align="left"height="09">';
	  echo ':-';
	  echo '</th>';
	  echo '<td width="142" height="24">';
	  echo '<div contenteditable>';
	  echo "<input type='text' name='School_Id' value='$School_Id'/>";
	  echo '</div>';
	  echo '</td>';
	  echo '<td width="-1">';
	  echo '</td>';
	  echo '<td width="56">';
	  echo "School Status";
	  echo '</td>';
	  echo '<td width="10" height="09">';
	  echo ':-';
	  echo '</td>';
	  echo '<td width="122">';
	  if($Status=="National")
	  {
	    echo '<input type="radio" name="Status" value="National" id="Status_0" checked="checked" />';
	   echo "National";
	  }
	  else
	  {
		  echo '<input type="radio" name="Status" value="National" id="Status_0" />';
	   echo "National";
	  }
        echo '<br />';
        if($Status=="Provincial")
		{
          echo '<input type="radio" name="Status" value="Provincial" id="Status_1" checked="checked" />';
          echo "Provincial";
  }
  else
  {
	   echo '<input type="radio" name="Status" value="Provincial" id="Status_1" />';
          echo "Provincial";
  }
		  echo '</td>';
	  echo '<td width="79" height="24">';
	  echo "Telephone Number";
	  echo '</td>';
	  echo '<td width="8">';
	  echo ':-';
	  echo '</td>';
	  echo '<td width="177" height="24">';
	  echo '<div contenteditable>';
	 echo "<input type='text' name='Tp_Number' value='$Tp_Number'/>";
	  echo '</div>';
	  echo '</td>';
	  echo '<td width="-1">';
	  echo '</td>';
	  echo '<td width="55">';
	  
	  echo "Account Number";
	   echo '</td>';
	  echo '<td width="10">';
	  echo ":-";
	  echo '</td>';
	  echo '<td width="411">';
	  echo '<div contenteditable>';
	 echo "<input type='text' name='Account_Number' value='$Account_Number'/>";
	  echo '</div>';
	  echo '</td>';
    echo '</tr>';
	echo '<tr height="10>';
		   echo '<td headers="10">';
		   echo '</td>';
		    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" scope="row" align="left">';
	  echo "School Name";
      echo '</th>';
      echo '<th scope="row" align="left">';
	  echo ':-';
	  echo '</th>';
     echo '<td>';
	 echo '<div contenteditable>';
	 echo "<input type='text' name='Name' value='$Name'/>";
	 echo '</div>';
	 echo '</td>';
     echo '<td>';
	 echo '</td>';
     echo '<td>';
	 echo "School Type";
	 echo '</td>';
     echo '<td>';
	 echo ':-';
	 echo '</td>';
     echo '<td>';
	 if($Type=="1AB")
	 {
       echo '<input type="radio" name="Type" value="1AB" id="Type_0" checked="checked" />';
       echo "1AB";
	 }
      
	   else
	   {
		   echo '<input type="radio" name="Type" value="1AB" id="Type_0" />';
       echo "1AB";} 
	    echo '<br />';
        if($Type=="1C")
	 {
         echo '<input type="radio" name="Type" value="1C" id="Type_1" checked="checked" />';
         echo "1C";
	 }
	 else
	 {
		  echo '<input type="radio" name="Type" value="1C" id="Type_1" />';
         echo "1C";
	 }
       echo '<br />';
       
	     if($Type=="2")
	 {
         echo '<input type="radio" name="Type" value="2" id="Type_2" checked="checked" />';
         echo "2";
	 } else
	 {
		  echo '<input type="radio" name="Type" value="2" id="Type_2" />';
         echo "2";
	 }
       echo '<br />';
      if($Type=="3")
	  { 
         echo '<input type="radio" name="Type" value="3" id="Type_3" checked="checked" />';
         echo "3";
	  }
		  else
	 {
		 echo '<input type="radio" name="Type" value="3" id="Type_3" />';
         echo "3";
	 }
		 echo '</td>';
		  
     echo '<td height="24">';
	 echo "Fax Number";
	 echo '</td>';
     echo '<td>';
	 echo ':-';
	 echo '</td>';
     echo '<td>';
	 echo '<div contenteditable>';
	 echo "<input type='text' name='Fax_Number' value='$Fax_Number'/>";
	 echo '</div>';
	 echo '</td>';
     echo '<td>';
	 echo '</td>';
     echo '<td colspan="3">';
	 echo '</td>';
    echo '</tr>';
	echo '<tr height="10>';
		   echo '<td headers="10">';
		   echo '</td>';
		    echo '</tr>';
    echo '<tr>';
      echo '<th height="29" align="left" scope="row">';
	  echo "School Address";
      echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td>';
	  echo '<div contenteditable>';
	 echo   "<input type='text' name='Address' value='$Address'/>";
	  echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo "Grade Range";
	echo '</td>';
      echo '<td>';
	  echo ':-';
	  echo '</td>';
      echo '<td>';
	  if($Grade_Range=="1-5")
	  {
        echo '<input type="radio" name="Grade_Range" value="1-5" id="Grade_Range_0" checked="checked" />';
        echo "1-5";
	  }
	  else
	  {
		  echo '<input type="radio" name="Grade_Range" value="1-5" id="Grade_Range_0" />';
        echo "1-5";
	  }
	   echo '<br />';
	  if($Grade_Range=="1-11")
	  {
       
        echo '<input type="radio" name="Grade_Range" value="1-11" id="Grade_Range_3" checked="checked" />';
          echo "1-11";
		  }
	  else
	  {
		  echo '<input type="radio" name="Grade_Range" value="1-11" id="Grade_Range_3" />';
          echo "1-11";
	  }
        echo '<br />';
		if($Grade_Range=="1-13")
		{
       echo '<input type="radio" name="Grade_Range" value="1-13" id="Grade_Range_4" checked="checked" />';
          echo "1-13";
        }
	  else
	  {
		   echo '<input type="radio" name="Grade_Range" value="1-13" id="Grade_Range_4" />';
          echo "1-13";
	  }
        echo '<br />';
       
       if($Grade_Range=="6-11")
	   {   echo '<input type="radio" name="Grade_Range" value="6-11" id="Grade_Range_1" checked="checked" />';
          echo "6-11";
		  }
	  else
	  {
		  echo '<input type="radio" name="Grade_Range" value="6-11" id="Grade_Range_1" />';
          echo "6-11";
	  }
		 echo '<br />';
       if($Grade_Range=="6-13")
	   {
          echo '<input type="radio" name="Grade_Range" value="6-13" id="Grade_Range_2" checked="checked" />';
          echo "6-13";
		  }
	  else
	  {
		  echo '<input type="radio" name="Grade_Range" value="6-13" id="Grade_Range_2" />';
          echo "6-13";
	  }
		echo '<br />';
		if($Grade_Range=="Others")
		{
        echo '<input type="radio" name="Grade_Range" value="Others" id="Grade_Range_5" checked="checked" />';
          echo "Others";
		}
	  else
	  {
		  echo '<input type="radio" name="Grade_Range" value="Others" id="Grade_Range_5" />';
          echo "Others";
	  }
		  echo '</td>';
      echo '<td height="24">';
	  echo "Email Address";
	  echo '</td>';
      echo '<td>';
	  echo ':-';
	  echo '</td>';
      echo '<td>';
	  echo '<div contenteditable>';
	  echo "<input type='text' name='E_Mail' value='$E_Mail'/>";
	  echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
	  echo '</td>';
    echo '</tr>';
	echo '<tr>';
    echo '<th height="24" align="left" scope="row">';
	echo "Census Number";
	echo '</th>';
    echo '<th scope="row">';
	echo ':-';
	echo '</th>';
    echo '<td>';
	echo "<input type='text' name='Census_Number' value='$Census_Number'/>";
	echo '</td>';
    echo '</tr>';
	echo '<tr height="10>';
		   echo '<td headers="10">';
		   echo '</td>';
		    echo '</tr>';
    echo '<tr>';
      echo '<th height="27" align="left" scope="row">'; 
	  echo "Division";
      echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td>';
	  echo '<div contenteditable>';
	 echo "<input type='text' name='Division' value='$Division'/>";
	  echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo "Medium";
	  echo '</td>';
      echo '<td>';
	  echo ':-';
	  echo '</td>';
      echo '<td>';
	  if($Medium =="Tamil")
	  {
        echo '<input type="radio" name="Medium" value="Tamil" id="Medium_0" checked="checked" />';
       echo "Tamil";
	   }else
	   {
		   echo '<input type="radio" name="Medium" value="Tamil" id="Medium_0" />';
       echo "Tamil";
	   }
        echo '<br />';
		if($Medium=="English")
	  {
        echo '<input type="radio" name="Medium" value="English" id="Medium_1" checked="checked" />';
          echo "English";
	  }else
	  {
		  echo '<input type="radio" name="Medium" value="English" id="Medium_1" />';
          echo "English";
	  }
        echo '<br />';
		if($Medium=="Mix(Tamil & English)")
	  {
        echo '<input type="radio" name="Medium" value="Mix(Tamil &amp; English)" id="Medium_2" checked="checked" />';
          echo "Mix(Tamil &amp; English)";
	  }
		  else
		  {
			  echo '<input type="radio" name="Medium" value="Mix(Tamil &amp; English)" id="Medium_2" />';
          echo "Mix(Tamil &amp; English)";
		  }
        echo '<br />';
		if($Medium=="Sinhala")
	  {
        echo '<input type="radio" name="Medium" value="Sinhala" id="Medium_3" checked="checked" />';
          echo "Sinhala";
	  }else
	  {
		   echo '<input type="radio" name="Medium" value="Sinhala" id="Medium_3" />';
          echo "Sinhala";
	  }
        echo '<br />';
		if($Medium=="Mix(Tamil &amp; Sinhala)")
	  {
       echo '<input type="radio" name="Medium" value="Mix(Tamil &amp; Sinhala)" id="Medium_4" checked="checked" />';
          echo "Mix(Tamil &amp; Sinhala)";
	  }else
	  {
		  echo '<input type="radio" name="Medium" value="Mix(Tamil &amp; Sinhala)" id="Medium_4" />';
          echo "Mix(Tamil &amp; Sinhala)";
	  }
        echo '<br />';
		if($Medium=="Mix(Tamil,English &amp; Sinhala)")
	  {
        echo '<input type="radio" name="Medium" value="Mix(Tamil,English &amp; Sinhala)" id="Medium_5" checked="checked" />';
         echo "Mix(Tamil,English &amp; Sinhala)";
	  }else
	  {
		   echo '<input type="radio" name="Medium" value="Mix(Tamil,English &amp; Sinhala)" id="Medium_5" />';
         echo "Mix(Tamil,English &amp; Sinhala)";
	  }
		 echo '</td>';
      echo '<td height="24">';
	  echo "Web Address";
	  echo '</td>';
      echo '<td>';
	  echo ':-';
	  echo '</td>';
      echo '<td>';
	  echo '<div contenteditable>';
	  echo "<input type='text' name='Web_Address' value='$Web_Address'/>";
	  echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
	  echo '</td>';
    echo '</tr>';
	echo '<tr height="10>';
		   echo '<td headers="10">';
		   echo '</td>';
		    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	   echo "Zone";
	   echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td>';
	  echo '<div contenteditable>';
	  echo "<input type='text' name='Zone' value='$Zone'/>";
	echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo "Special projects";
       echo '</td>';
      echo '<td>';
	  echo ':-';
	  echo '</td>';
      echo '<td>';
	  for($i=0;$i<count($Special_Projects);$i++)
  {
  
	  if($Special_Projects[$i]=="OLPC")
	  {
	  echo '<input type="checkbox" name="Special_Projects" value="OLPC" id="Special_Projects_0" checked="checked"/>';
        echo "OLPC";
	  }
	  else
	  {
		  echo '<input type="checkbox" name="Special_Projects" value="OLPC" id="Special_Projects_0"/>';
        echo "OLPC";
	  }
		echo '<br />';
		if($Special_Projects[$i]=="Interactive Whiteboard")
	  {
       echo '<input type="checkbox" name="Special_Projects" value="Interactive Whiteboard" id="Special_Projects_1" checked="checked" />';
          echo "Interactive Whiteboardecho";
	  }
		  else
		  {
			  echo '<input type="checkbox" name="Special_Projects" value="Interactive Whiteboard" id="Special_Projects_1" />';
          echo "Interactive Whiteboardecho";
		  }
		  echo '<br />';
		  if($Special_Projects[$i]!="OLPC"&&$Special_Projects[$i]!="Interactive Whiteboard")
	  {
        echo '<input type="checkbox" name="Special_Projects" value="Others" id="Special_Projects_2" checked="checked" />';
          echo "Others(Plz.specify)";
		 echo "<input type='text' name='Special_Projects_other' id='textfield10' value='$Special_Projects' />";
	  }
	  else
	  {
		  echo '<input type="checkbox" name="Special_Projects" value="Others" id="Special_Projects_2" />';
          echo "Others(Plz.specify)";
		 echo '<input type="text" name="Special_Projects_other" id="textfield10" />';
	  }
	  }
     
      echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
	  echo '</td>';
    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	  echo "District";
      echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td>';
	  echo '<div contenteditable>';
	  echo "<input type='text' name='District' value='$District'/>";
	  echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
	  echo '</td>';
    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	  echo "Province";
	  echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td>';
	  echo '<div contenteditable>';
    echo "<input type='text' name='Province' value='$Province'/>";
	 echo '</div>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';echo "Map:";
        echo '<input type="file" name="Browse2" value="Browse"/>';
	  echo '</td>';
    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	  echo "Number of Students";
	  echo '</th>';
      echo '<th scope="row">';
	  echo ':-';
	  echo '</th>';
      echo '<td colspan="6">';
	  echo '<div contenteditable>';
	  echo "Male:";
       echo "<input type='text' name='Male_Students' value='$Male_Students'/>";
        
       
		echo "Female:";
         echo "<input type='text' name='Female_Students' value='$Female_Students'/>";
		echo '</div>';
		echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
	  echo '<td>';
	  echo '</td>';
	   echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
	   echo '<input name="SaveChanges" align="middle" type="submit" value="Save changes"/>';
	  
		echo '</td>';
    echo '</tr>';
    echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	  echo '<br />';
        echo '</th>';
      echo '<th scope="row">';
	  echo '</th>';
      echo '<td colspan="6">';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  
	  echo '</td>';
      echo '<td colspan="3">';
        
	   echo '</td>';
    echo '</tr>';
	
      
	
	 echo '<tr>';
      echo '<th height="24" align="left" scope="row">';
	  echo '<br />';
        echo '</th>';
      echo '<th scope="row">';
	  echo '</th>';
      echo '<td colspan="6">';
	  echo '</td>';
      echo '<td>';
	  
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td>';
	  echo '</td>';
      echo '<td colspan="3">';
        
	   echo '</td>';
    echo '</tr>';
	}
 echo '</table>';


 }
 }
?>
 </form>
  </div>
</div>

<div class="rightmenus"> 
    
 <h1>Schools</h1>
      <br/>
  <table width="220" border="0">
    <tr>
      <td height="41"><a href="AddSch.php">Add New School</a></td>
    </tr>
    <tr>
      <td height="41"><a href="SearchSch.php">Search a School's data</a></td>
    </tr>
    <tr>
      <td height="41"><a href="UpdateSch.php">Update a School's data</a></td>
    </tr>
    <tr>
      <td height="41"><a href="DelSch.php">Delete a School</a></td>
    </tr>
    <tr>
      <td height="41"><a href="Viewall.php">View All</a></td>
    </tr>
  </table>
</div>
 
 <div style="clear: both;"> </div>


<div id="footer">
  <table width="1217" height="50" border="0">
  <tr>
    <td width="903" height="46">Schools Managemrnt System &copy; 2012 </td>
    <td width="50"><strong><a href="#" class="active">Home</a><a href="#"></a></strong>|</td>
    <td width="91"><strong><a href="#">Contact us</a></strong>|</td>
    <td width="27"><a href="http//www.facebook.com"><img src="../images/facebook1.png" width="38" height="38"/></a></td>
    <td width="26"><a href="http//twitter.com"><img src="../images/twitter.png" width="38" height="38"/></a></td>
    <td width="26"><a href="http//www.google.lk"><img src="../images/google.png" width="38" height="38"/></a></td>
    <td width="64"><a href=""http="http"//www.yahoo.com""><img src="../images/yahoo.png" width="38" height="38"/></a></td>
  </tr>
</table>

</div>
</div>
<?php
}
?>
</body>
</html>